package Pay;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
        double money = 50;
        System.out.println("你需要支付的金额为："+money);
        System.out.println("请选择你的支付方式：1.银行卡 2.支付宝 3.微信");
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
        switch (i){
            case 1:
                System.out.println("银行卡支付");
                Pay bankpay = new Bankpay();
                bankpay.pay(money);
                break;
            case 2:
                System.out.println("支付宝支付");
                Pay zhifubaoPay = new Bankpay();
                zhifubaoPay.pay(money);
                break;
            case 3:
                System.out.println("微信支付");
                Pay vXpay = new Bankpay();
                vXpay.pay(money);
                break;
        }

    }
}
